package com.sy.shiro;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.apache.shiro.authc.AuthenticationToken;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class UsernameToken implements AuthenticationToken {

    private String phone;
    private String pass;
    private Long userId;
//    private long ttl;

    @Override
    public Object getPrincipal() {
        return phone;
    }

    @Override
    public Object getCredentials() {
        return pass;
    }


    public static void main(String[] args) {
//        System.out.println("args = [" + MD5Utils.genMd5("admin#123abc") + "]");
//        System.out.println("args = [" + MD5Utils.genMd5("testa1b2c3") + "]");
    }
}
